﻿using Common.FrontEnd;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Util.Props;

namespace FrontEnd
{
    /// <summary>
    /// /**
    /// A processor that performs a signal processing function.
    ///
    /// Since a DataProcessor usually belongs to a particular front end pipeline,
    /// you can name the pipeline it belongs to in the {@link #initialize()
    /// initialize} method. (Note, however, that it is not always the case that a
    /// DataProcessor belongs to a particular pipeline. For example, the {@link
    /// sphincs.frontend.util.Microphone Microphone}class is a DataProcessor,
    /// but it usually does not belong to any particular pipeline.  <p/> Each
    /// DataProcessor usually have a predecessor as well. This is the previous
    /// DataProcessor in the pipeline. Again, not all DataProcessors have
    /// predecessors.  <p/> Calling {@link #getData() getData}will return the
    /// processed Data object.
    ///
    /// </summary>
    public interface IDataProcessor: IConfigurable
    {
         /**
        /// Initializes this DataProcessor.
         *
        /// This is typically called after the DataProcessor has been configured.
         */
         void initialize();


        /**
        /// Returns the processed Data output.
         *
        /// @return an Data object that has been processed by this DataProcessor
        /// @throws DataProcessingException if a data processor error occurs
         */
         IData getData();


        /**
        /// Returns the predecessor DataProcessor.
         *
        /// @return the predecessor
         */
        IDataProcessor getPredecessor();


        /**
        /// Sets the predecessor DataProcessor. This method allows dynamic reconfiguration of the front end.
         *
        /// @param predecessor the new predecessor of this DataProcessor
         */
        void setPredecessor(IDataProcessor predecessor);

    }
}
